<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>
<h1>会员中心</h1>

<div class="userinfo"></div>

<script>
let sesUname = sessionStorage.getItem('uname')
let lclUname = (new Date).getTime() > localStorage.getItem('expires')?null : localStorage.getItem('uname')
let uname = sesUname || lclUname

if(uname) {
    document.querySelector('.userinfo').innerHTML = `
        <h1>欢迎大哥:${uname},大哥来根华子<h1>
        <a href="./logout.html">告辞</a>
    `
} else {
    document.querySelector('.userinof').innerHTML = `
        <h1><a href="./logout.html">请登录</a><h1>
    `
}

</script>